package dn.tedu.boot41.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AxiosController {
    @RequestMapping("/helloAxios")
    public String hello(String info) {
        return "接受到了请求! info=" + info;
    }

    @RequestMapping("/reg")
    public String reg(String username, String password) {
        return "注册成功";
    }

    @RequestMapping("/check")
    public int check(String username){
        if (username.equals("tom")){
            return 2;//代表已存在
        }
        return 1; //代表可用
    }
}
